(0) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
quicksort(Cons(x, Cons(x', xs))) → part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil)
quicksort(Cons(x, Nil)) → Cons(x, Nil)
quicksort(Nil) → Nil
part(x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2)
part(x, Nil, xs1, xs2) → app(quicksort(xs1), quicksort(xs2))
app(Cons(x, xs), ys) → Cons(x, app(xs, ys))
app(Nil, ys) → ys
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → quicksort(xs)
The (relative) TRS S consists of the following rules:
<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
>(S(x), S(y)) → >(x, y)
>(0, y) → False
>(S(x), 0) → True
part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) → part(x', xs, Cons(x, xs1), xs2)
part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2)
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
quicksort(Cons(x, Cons(x', xs))) → part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil)
quicksort(Cons(x, Nil)) → Cons(x, Nil)
quicksort(Nil) → Nil
part(x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2)
part(x, Nil, xs1, xs2) → app(quicksort(xs1), quicksort(xs2))
app(Cons(x, xs), ys) → Cons(x, app(xs, ys))
app(Nil, ys) → ys
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → quicksort(xs)
The (relative) TRS S consists of the following rules:
<(S(x), S(y)) → <(x, y)
<(0', S(y)) → True
<(x, 0') → False
>(S(x), S(y)) → >(x, y)
>(0', y) → False
>(S(x), 0') → True
part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) → part(x', xs, Cons(x, xs1), xs2)
part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite][False][Ite](<(x', x), x', Cons(x, xs), xs1, xs2)
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
part[Ite][True][Ite][False][Ite]/1
part[Ite][True][Ite][False][Ite]/2
part[Ite][True][Ite][False][Ite]/3
part[Ite][True][Ite][False][Ite]/4
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
quicksort(Cons(x, Cons(x', xs))) → part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil)
quicksort(Cons(x, Nil)) → Cons(x, Nil)
quicksort(Nil) → Nil
part(x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2)
part(x, Nil, xs1, xs2) → app(quicksort(xs1), quicksort(xs2))
app(Cons(x, xs), ys) → Cons(x, app(xs, ys))
app(Nil, ys) → ys
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → quicksort(xs)
The (relative) TRS S consists of the following rules:
<(S(x), S(y)) → <(x, y)
<(0', S(y)) → True
<(x, 0') → False
>(S(x), S(y)) → >(x, y)
>(0', y) → False
>(S(x), 0') → True
part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) → part(x', xs, Cons(x, xs1), xs2)
part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite][False][Ite](<(x', x))
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
quicksort(Cons(x, Cons(x', xs))) → part(x, Cons(x, Cons(x', xs)), Cons(x, Nil), Nil)
quicksort(Cons(x, Nil)) → Cons(x, Nil)
quicksort(Nil) → Nil
part(x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite](>(x', x), x', Cons(x, xs), xs1, xs2)
part(x, Nil, xs1, xs2) → app(quicksort(xs1), quicksort(xs2))
app(Cons(x, xs), ys) → Cons(x, app(xs, ys))
app(Nil, ys) → ys
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
goal(xs) → quicksort(xs)
<(S(x), S(y)) → <(x, y)
<(0', S(y)) → True
<(x, 0') → False
>(S(x), S(y)) → >(x, y)
>(0', y) → False
>(S(x), 0') → True
part[Ite][True][Ite](True, x', Cons(x, xs), xs1, xs2) → part(x', xs, Cons(x, xs1), xs2)
part[Ite][True][Ite](False, x', Cons(x, xs), xs1, xs2) → part[Ite][True][Ite][False][Ite](<(x', x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
quicksort,
part,
>,
app,
<They will be analysed ascendingly in the following order:
quicksort = part
> < part
app < part
< < part
(8) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
>, quicksort, part, app, <
They will be analysed ascendingly in the following order:
quicksort = part
> < part
app < part
< < part
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
>(
gen_S:0'5_0(
n7_0),
gen_S:0'5_0(
n7_0)) →
False, rt ∈ Ω(0)
Induction Base:
>(gen_S:0'5_0(0), gen_S:0'5_0(0)) →RΩ(0)
False
Induction Step:
>(gen_S:0'5_0(+(n7_0, 1)), gen_S:0'5_0(+(n7_0, 1))) →RΩ(0)
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) →IH
False
We have rt ∈ Ω(1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n0).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
app, quicksort, part, <
They will be analysed ascendingly in the following order:
quicksort = part
app < part
< < part
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
app(
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(
n294_0),
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(
b)) →
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(
+(
n294_0,
b)), rt ∈ Ω(1 + n294
0)
Induction Base:
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) →RΩ(1)
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)
Induction Step:
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, 1)), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) →RΩ(1)
Cons(0', app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b))) →IH
Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(b, c295_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
<, quicksort, part
They will be analysed ascendingly in the following order:
quicksort = part
< < part
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
<(
gen_S:0'5_0(
n1165_0),
gen_S:0'5_0(
+(
1,
n1165_0))) →
True, rt ∈ Ω(0)
Induction Base:
<(gen_S:0'5_0(0), gen_S:0'5_0(+(1, 0))) →RΩ(0)
True
Induction Step:
<(gen_S:0'5_0(+(n1165_0, 1)), gen_S:0'5_0(+(1, +(n1165_0, 1)))) →RΩ(0)
<(gen_S:0'5_0(n1165_0), gen_S:0'5_0(+(1, n1165_0))) →IH
True
We have rt ∈ Ω(1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n0).
(16) Complex Obligation (BEST)
(17) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
<(gen_S:0'5_0(n1165_0), gen_S:0'5_0(+(1, n1165_0))) → True, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
part, quicksort
They will be analysed ascendingly in the following order:
quicksort = part
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol part.
(19) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
<(gen_S:0'5_0(n1165_0), gen_S:0'5_0(+(1, n1165_0))) → True, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
The following defined symbols remain to be analysed:
quicksort
They will be analysed ascendingly in the following order:
quicksort = part
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol quicksort.
(21) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
<(gen_S:0'5_0(n1165_0), gen_S:0'5_0(+(1, n1165_0))) → True, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
(23) BOUNDS(n^1, INF)
(24) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
<(gen_S:0'5_0(n1165_0), gen_S:0'5_0(+(1, n1165_0))) → True, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
(26) BOUNDS(n^1, INF)
(27) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
app(gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(n294_0), gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(b)) → gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(n294_0, b)), rt ∈ Ω(1 + n2940)
(29) BOUNDS(n^1, INF)
(30) Obligation:
Innermost TRS:
Rules:
quicksort(
Cons(
x,
Cons(
x',
xs))) →
part(
x,
Cons(
x,
Cons(
x',
xs)),
Cons(
x,
Nil),
Nil)
quicksort(
Cons(
x,
Nil)) →
Cons(
x,
Nil)
quicksort(
Nil) →
Nilpart(
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite](
>(
x',
x),
x',
Cons(
x,
xs),
xs1,
xs2)
part(
x,
Nil,
xs1,
xs2) →
app(
quicksort(
xs1),
quicksort(
xs2))
app(
Cons(
x,
xs),
ys) →
Cons(
x,
app(
xs,
ys))
app(
Nil,
ys) →
ysnotEmpty(
Cons(
x,
xs)) →
TruenotEmpty(
Nil) →
Falsegoal(
xs) →
quicksort(
xs)
<(
S(
x),
S(
y)) →
<(
x,
y)
<(
0',
S(
y)) →
True<(
x,
0') →
False>(
S(
x),
S(
y)) →
>(
x,
y)
>(
0',
y) →
False>(
S(
x),
0') →
Truepart[Ite][True][Ite](
True,
x',
Cons(
x,
xs),
xs1,
xs2) →
part(
x',
xs,
Cons(
x,
xs1),
xs2)
part[Ite][True][Ite](
False,
x',
Cons(
x,
xs),
xs1,
xs2) →
part[Ite][True][Ite][False][Ite](
<(
x',
x))
Types:
quicksort :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Cons :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
part :: S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
Nil :: Cons:Nil:part[Ite][True][Ite][False][Ite]
part[Ite][True][Ite] :: True:False → S:0' → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
> :: S:0' → S:0' → True:False
app :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
notEmpty :: Cons:Nil:part[Ite][True][Ite][False][Ite] → True:False
True :: True:False
False :: True:False
goal :: Cons:Nil:part[Ite][True][Ite][False][Ite] → Cons:Nil:part[Ite][True][Ite][False][Ite]
< :: S:0' → S:0' → True:False
S :: S:0' → S:0'
0' :: S:0'
part[Ite][True][Ite][False][Ite] :: True:False → Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_Cons:Nil:part[Ite][True][Ite][False][Ite]1_0 :: Cons:Nil:part[Ite][True][Ite][False][Ite]
hole_S:0'2_0 :: S:0'
hole_True:False3_0 :: True:False
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0 :: Nat → Cons:Nil:part[Ite][True][Ite][False][Ite]
gen_S:0'5_0 :: Nat → S:0'
Lemmas:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
Generator Equations:
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(0) ⇔ Nil
gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(+(x, 1)) ⇔ Cons(0', gen_Cons:Nil:part[Ite][True][Ite][False][Ite]4_0(x))
gen_S:0'5_0(0) ⇔ 0'
gen_S:0'5_0(+(x, 1)) ⇔ S(gen_S:0'5_0(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(1) was proven with the following lemma:
>(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) → False, rt ∈ Ω(0)
(32) BOUNDS(1, INF)